package com.itheima;

import com.itheima.pojo.Student;
import com.itheima.pojo.Teacher;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2020-08-05 09:22
 * @description 无参构造 各种类型属性注入
 *
 *
 */
public class Test04 {


    public static void main(String[] args) {

        //创建spring容器对象 给出配置文件的地址
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");


        //获取名字叫做 student01对象


        Student student01 = (Student) context.getBean("student01");
        System.out.println("获取的对象:"+student01);

    }


}
